<!-- 
该页面用途：点击按钮或者轮盘，进行抽奖。
 -->
<%@ page language="java"
	import="java.util.*,com.gxuwz.Market.weixin.common.*"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>front/" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>抽奖记录</title>
		<link href="css/jieshao.css" rel="stylesheet" type="text/css" />
		<script src="js/sweetalert.min.js"></script>
		<link rel="stylesheet" type="text/css" href="js/sweetalert.css">
<style type="text/css">
* {
	margin: 0;
	padding: 0;
	text-decoration: none;
}
/*pages*/
.pagination-wrapper {
	clear: both;
	padding: 1em 0 2em 0;
	text-align: center;
	font-size: 12px;
}

.pagination-pagesize {
    margin:0px 0px 0px 5%;
	float:left;
}
.pagination {
	display: inline-block;
	*zoom: 1;
	font-size: 12px;
	/* border-radius: 3px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); */
}

.pagination li {
	list-style: none;
	display: inline;
	float: left;
	padding-left:6px;
	/* line-height: 1em; */
	text-decoration: none;
	/* border: 1px solid #ddd;*/
	border-left-width: 0;
	text-decoration:underline;
}

/* .pagination li a {
	display: inline-block;
	padding: .2em .2em;
	background-color: #f9f9f9;
	color: #999;
} */

.pagination li a:link {
	/* background: #fff; */
	color: #444444;
}

.pagination li a:hover {

	text-decoration: none;
}

.pagination li a:link:hover {
	color: #000;
}

.pagination li.thisclass {
	background-color: #f9f9f9;
	color: #999;
}

.pagination li:first-child {
}

.pagination li:last-child {
}

.pagination .pageinfo {
    background-color: #f9f9f9;
}
</style>
</head>
<body onload="showTips()">
	<<div class="top"><img src="images/js-bg2017.jpg" width="720" height="509" /></div>
	<div class="content">

		<div>
		
			<tr>已抽奖：<a style="color:#ffff00;" href="<%= basePath%>LuckDraw.action?myOder=DoInLD&isDoLuck=null&openid=${openid}">${AllCount}</a>次
		    </tr>
		
		</div>
		<div>
			
			<tr>已中奖：<a style="color:#ffff00;" href="<%= basePath%>LuckDraw.action?myOder=DoInLD&isDoLuck=1&openid=${openid}">${counts }</a>次</tr>
			
		</div>
		<div style="float:left;width:50%;">未中奖：<a style="color:#ffff00;" href="<%= basePath%>LuckDraw.action?myOder=DoInLD&isDoLuck=0&openid=${openid}">${notCounts }</a>次</div>
		</a><div style="float:left;width:17%;">&nbsp;</div>
		<div style="float:right;width:33%;"><a style="color:#ffff00;" href="<%= basePath%>LuckDraw.action?myOder=DoInLD&isLuck=1">活动详情</a></div>
		<div>
			<hr style="height:15%;border:none;border-top:10px #000000;" />
		</div>
		<div style="margin-top: 30px">
			<%-- <div style="float:left;margin-left:25%;"><a style="color:#ffff00;" href="<%= basePath%>LuckDraw.action?myOder=DoInLD&isDoLuck=1&openid=${openid}">已中奖</a></div>
			<div style="margin-left:55%;"><a style="color:#ffff00;" href="<%= basePath%>LuckDraw.action?myOder=DoInLD&isDoLuck=0&openid=${openid}">未中奖</a></td> --%>
			</div>
			<div>
				<table class="tablelist">
					<thead>
						<tr>
							<th width="15%">序号</th>
							<!--  <th>二维码</th> -->
							<th width="35%">中奖金额</th>
							<th width="35%">中奖日期</th>
						</tr>
					</thead>
					<tbody>
						<s:iterator value="pageResult.data">
							<tr style="text-align: center;">
								<td>${cjId}</td>
								<td>${awards}</td>
								<td>${cjTime}</td>
							</tr>
						</s:iterator>
					</tbody>
				</table>
			</div>
			<div style="height: 20px;"></div>
		</div>
		<!-- 分页菜单组件--------------------------开始 -->
		<%
//查询的url地址，统一写
String listActionURL = basePath+"/biz/SysRole_list.action";
%>

		<script type="text/javascript">
//分页组件
function change()
  {
  var url = "<%= basePath%>/biz/SysRole_list.action";                 //获取表单url
 	var textfield=document.getElementById("textfield").value;
 	var totalPage='${pageResult.totalPage}';
 	var pageNum = 0;
 	if(totalPage*1 >= textfield*1){
 		pageNum = textfield; 
 		window.location.href  = url+"?page="+pageNum;
 	}else{
 		pageNum = totalPage; 
 		alert("当前只有"+totalPage+"页");
 	}
  	
  }
</script>
		<script type="text/javascript">
			var url = "<%= basePath%>LuckDraw.action"; //获取表单url
			//首页
			function first() {
				window.location.href = url + "?page=1&myOder=DoInLD&openid=${openid}&isDoLuck=${isDoLuck}";
			}
			//上一页
			function previous() {
				window.location.href = url + "?page=${pageResult.previousPageNumber}&myOder=DoInLD&openid=${openid}&isDoLuck=${isDoLuck}";
			}
			//下一页
			function next() {
				window.location.href = url + "?page=${pageResult.nextPageNumber}&myOder=DoInLD&openid=${openid}&isDoLuck=${isDoLuck}";
			}
			//尾页
			function last() {
				window.location.href = url + "?page=${pageResult.totalPage}&myOder=DoInLD&openid=${openid}&isDoLuck=${isDoLuck}";
			}
		</script>

		<!-- 分页 -->
		<div class="pagination-wrapper">
		    <div class="pagination-pagesize">
				共${pageResult.total}条记录 ${pageResult.totalPage}页，
				当前第&nbsp;${pageResult.page}页
			</div>
			<div class="pagination">
				<c:choose>
					<c:when test="${pageResult.isFirst==true}">
						<li><a>首页</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="javascript:first()" target="rightFrame">首页</a></li>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${pageResult.isFirst==true}">
						<li><a>上一页</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="javascript:previous()" target="rightFrame">上一页</a></li>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${pageResult.hasNext==true}">
						<li><a href="javascript:next()" target="rightFrame">下一页</a></li>
					</c:when>
					<c:otherwise>
						<li><a>下一页</a></li>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${pageResult.isLast==true}">
						<li><a>尾页</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="javascript:last()" target="rightFrame">尾页</a></li>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
		<!-- 分页菜单组件--------------------------结束 -->
</body>
<script type="text/javascript">
function showTips(){
	if("${tips}".length > 0){
		//alert('${tips}');
		//swal("${tips}");
		swal({
			title: "温馨提示",
			text: "${tips}",
			type: "warning",
			showCancelButton: false,
			confirmButtonColor: "#DD6B55",
			confirmButtonText: "我知道了",
			closeOnConfirm: true }, function(){
				//不做任何处理，只是想用这个样式而已
		});
	}
}
</script>
</html>